/*
 * PlayersManager.java
 *
 * Created on 8 de Agosto de 2007, 16:32
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.gpp.proj1.ui.gui.lobby;

import java.util.Hashtable;

/**
 *
 * @author Gustavo
 */
public class PlayersManager {
    
    private Hashtable<Integer, PlayerEntry> players;
    
    /** Creates a new instance of PlayersManager */
    public PlayersManager() {
    }
    
    public void addPlayer( PlayerEntry player ) {
        this.players.put( player.getId(), player );
    }
    
    public void removePlayer( int id ) {
        this.players.remove( id );
    }
    
    public PlayerEntry getPlayer( int id ) {
        return this.players.get( id );
    }
}
